home *** CD-ROM | disk | FTP | other *** search
Wrap
/3.1 (Extension.1 Name: "Neatline" Dependencies: "$AVBIN/avdlog.dll\n" FirstRootClassName: "AVDLog" Roots: 2 Roots: 80 Roots: 81 Roots: 82 Roots: 83 Roots: 84 Roots: 85 Roots: 86 Roots: 87 Roots: 88 Roots: 89 Roots: 90 Version: 30 About: "Layout button for creating neatlines" CanUnloadScript: 91 UnloadScript: 92 ExtVersion: 1 ) (AVDLog.2 Name: "Neatline Settings" X: 19 Y: 148 W: 512 H: 303 HelpTopic: "Layout_Neatline_Dialog" ConstrainedControlNames: 3 ConstrainedControlNames: 4 Constraints: 5 Constraints: 6 Server: 7 ControlPanel: 8 Title: "Neatline Settings" EscapeEnabled: 1 Modal: 1 AlwaysOnTop: 1 HasTitleBar: 1 Closeable: 1 Open: "Graphic.Neatline Open" DefaultButton: 79 ) (AVStr.3 S: "NLCancel" ) (AVStr.4 S: "NLOK" ) (Numb.5 N: 85.00000000000000 ) (Numb.6 N: 85.00000000000000 ) (Nil.7 ) (CPanel.8 Child: 9 Child: 39 Child: 65 Child: 66 Child: 67 Child: 68 Child: 69 Child: 70 ResBox: 71 ResBox: 72 ResBox: 73 ResBox: 74 ResBox: 75 ResBox: 76 ResBox: 77 ResBox: 78 Listening: 1 ) (CPanel.9 InternalName: "aControlPanel4" Child: 10 Child: 11 Child: 12 Child: 14 Child: 16 Child: 18 Child: 20 Child: 21 Child: 22 Child: 23 Child: 24 Child: 25 Constraints: 0x55 ResBox: 27 ResBox: 28 ResBox: 29 ResBox: 30 ResBox: 31 ResBox: 32 ResBox: 33 ResBox: 34 ResBox: 35 ResBox: 36 ResBox: 37 ResBox: 38 Label: "Positioning information" VisibleBorder: 1 Listening: 1 ) (TextLabel.10 InternalName: "aTextLabel7" Constraints: 0x55 Label: "Enter the distance the neatline should be\noffset from each side of the graphics:" Listening: 1 ) (TextLabel.11 InternalName: "unitText" Constraints: 0x55 Label: "(units):" Listening: 1 ) (TextLine.12 InternalName: "TopOffset" Text: "0.25" Constraints: 0x55 Listening: 1 TextType: 13 NextControl: 7 ) (AVEnum.13 Name: "TEXTLINE_TYPE_REAL" ) (TextLine.14 InternalName: "LeftOffset" Text: "0.25" Constraints: 0x55 Listening: 1 TextType: 15 NextControl: 7 ) (AVEnum.15 Name: "TEXTLINE_TYPE_REAL" ) (TextLine.16 InternalName: "BottomOffset" Text: "0.25" Constraints: 0x55 Listening: 1 TextType: 17 NextControl: 7 ) (AVEnum.17 Name: "TEXTLINE_TYPE_REAL" ) (TextLine.18 InternalName: "RightOffset" Text: "0.25" Constraints: 0x55 Listening: 1 TextType: 19 NextControl: 7 ) (AVEnum.19 Name: "TEXTLINE_TYPE_REAL" ) (TextLabel.20 InternalName: "TopText" Constraints: 0x55 Label: "Top:" Listening: 1 ) (TextLabel.21 InternalName: "BottomText" Constraints: 0x55 Label: "Bottom:" Listening: 1 ) (TextLabel.22 InternalName: "LeftText" Constraints: 0x55 Label: "Left:" Listening: 1 ) (TextLabel.23 InternalName: "RightText" Constraints: 0x55 Label: "Right:" Listening: 1 ) (AVCBox.24 InternalName: "OffsetEqual" Help: "Check this to offset the neatline equally on all sides" Listening: 1 Selected: 1 Label: "Offset equally" Click: "Graphic.Neatline Offset Option" Constraints: 0x55 ) (TextLine.25 InternalName: "EqualOffset" Text: "0.25" Constraints: 0x55 Listening: 1 TextType: 26 NextControl: 7 ) (AVEnum.26 Name: "TEXTLINE_TYPE_REAL" ) (RectD.27 Left: 9.00000000000000 Top: 57.00000000000000 Right: 274.00000000000000 Bottom: 16.00000000000000 ) (RectD.28 Left: 195.00000000000000 Top: 75.00000000000000 Right: 279.00000000000000 Bottom: 56.00000000000000 ) (RectD.29 Left: 57.00000000000000 Top: 124.00000000000000 Right: 117.00000000000000 Bottom: 104.00000000000000 ) (RectD.30 Left: 188.00000000000000 Top: 124.00000000000000 Right: 248.00000000000000 Bottom: 104.00000000000000 ) (RectD.31 Left: 57.00000000000000 Top: 146.00000000000000 Right: 117.00000000000000 Bottom: 126.00000000000000 ) (RectD.32 Left: 188.00000000000000 Top: 146.00000000000000 Right: 248.00000000000000 Bottom: 126.00000000000000 ) (RectD.33 Left: 10.00000000000000 Top: 124.00000000000000 Right: 53.00000000000000 Bottom: 107.00000000000000 ) (RectD.34 Left: 10.00000000000000 Top: 145.00000000000000 Right: 66.00000000000000 Bottom: 128.00000000000000 ) (RectD.35 Left: 150.00000000000000 Top: 122.00000000000000 Right: 191.00000000000000 Bottom: 107.00000000000000 ) (RectD.36 Left: 150.00000000000000 Top: 144.00000000000000 Right: 194.00000000000000 Bottom: 128.00000000000000 ) (RectD.37 Left: 7.00000000000000 Top: 91.00000000000000 Right: 193.00000000000000 Bottom: 68.00000000000000 ) (RectD.38 Left: 188.00000000000000 Top: 92.00000000000000 Right: 248.00000000000000 Bottom: 72.00000000000000 ) (CPanel.39 InternalName: "aControlPanel3" Child: 40 Child: 41 Child: 42 Child: 43 Child: 44 Child: 45 Child: 46 Child: 47 Child: 48 Child: 49 Child: 50 Child: 51 Constraints: 0x55 ResBox: 53 ResBox: 54 ResBox: 55 ResBox: 56 ResBox: 57 ResBox: 58 ResBox: 59 ResBox: 60 ResBox: 61 ResBox: 62 ResBox: 63 ResBox: 64 Label: "Appearance settings" VisibleBorder: 1 Listening: 1 ) (AVCBBox.40 InternalName: "NeatWidth" Help: "Choose a width for the outline of your neatline" NextControl: 7 ContentKind: 4 Constraints: 0x55 Listening: 1 ) (AVCBox.41 InternalName: "RoundCorners" Help: "Check this box to round the corners of your neatline" Listening: 1 Label: "Round the corners" Click: "Graphic.Neatline Round" Constraints: 0x55 ) (TextLabel.42 InternalName: "aTextLabel2" Constraints: 0x55 Label: "Click on a border style:" Listening: 1 ) (AVCBBox.43 InternalName: "CornerRadius" Help: "Choose a distance to round the corners" NextControl: 7 ContentKind: 4 Constraints: 0x55 Listening: 1 ) (AVCBBox.44 InternalName: "BGColor" Help: "Choose a background fill color for your neatline" NextControl: 7 ContentKind: 4 Constraints: 0x55 Listening: 1 Select: "Graphic.Neatline Can Drop Shadow" ) (AVCBox.45 InternalName: "DropShadow" Help: "Check this to add a drop-shadow to your neatline" Listening: 1 Label: "Drop-shadow" Click: "Graphic.Neatline DropShadow Update" Constraints: 0x55 ) (AVCBBox.46 InternalName: "DSColor" Help: "Choose a drop shadow color" NextControl: 7 ContentKind: 4 Constraints: 0x55 Listening: 1 ) (TextLabel.47 InternalName: "RadLab" Constraints: 0x55 Label: "Radius:" Listening: 1 ) (TextLabel.48 InternalName: "aTextLabel4" Constraints: 0x55 Label: "Width (pts.):" Listening: 1 ) (TextLabel.49 InternalName: "aTextLabel5" Constraints: 0x55 Label: "Fill color:" Listening: 1 ) (TextLabel.50 InternalName: "DSLabel" Constraints: 0x55 Label: "Shadow color:" Listening: 1 ) (AVLBox.51 InternalName: "NeatStyle" Help: "Click on a border style to select it" NextControl: 7 ContentKind: 4 Constraints: 0x55 ColumnCount: 1 Listening: 1 VerticalScroll: 1 Select: "Graphic.Neatline Nice Size" SelectionStyle: 52 ) (AVEnum.52 Name: "LISTBOX_SELECTION_SINGLECELL" ) (RectD.53 Left: 118.00000000000000 Top: 268.00000000000000 Right: 202.00000000000000 Bottom: 162.00000000000000 ) (RectD.54 Left: 11.00000000000000 Top: 117.00000000000000 Right: 182.00000000000000 Bottom: 100.00000000000000 ) (RectD.55 Left: 9.00000000000000 Top: 42.00000000000000 Right: 189.00000000000000 Bottom: 18.00000000000000 ) (RectD.56 Left: 118.00000000000000 Top: 226.00000000000000 Right: 202.00000000000000 Bottom: 123.00000000000000 ) (RectD.57 Left: 118.00000000000000 Top: 364.00000000000000 Right: 202.00000000000000 Bottom: 185.00000000000000 ) (RectD.58 Left: 10.00000000000000 Top: 232.00000000000000 Right: 141.00000000000000 Bottom: 210.00000000000000 ) (RectD.59 Left: 118.00000000000000 Top: 399.00000000000000 Right: 202.00000000000000 Bottom: 234.00000000000000 ) (RectD.60 Left: 16.00000000000000 Top: 140.00000000000000 Right: 117.00000000000000 Bottom: 122.00000000000000 ) (RectD.61 Left: 9.00000000000000 Top: 178.00000000000000 Right: 137.00000000000000 Bottom: 161.00000000000000 ) (RectD.62 Left: 9.00000000000000 Top: 202.00000000000000 Right: 134.00000000000000 Bottom: 184.00000000000000 ) (RectD.63 Left: 16.00000000000000 Top: 256.00000000000000 Right: 117.00000000000000 Bottom: 235.00000000000000 ) (RectD.64 Left: 10.00000000000000 Top: 92.00000000000000 Right: 198.00000000000000 Bottom: 34.00000000000000 ) (RButn.65 InternalName: "SelGraphics" Constraints: 0x55 Listening: 1 Label: "Place around the selected graphics" Click: "Graphic.Neatline Option Update" ) (RButn.66 InternalName: "AllGraphics" Constraints: 0x55 Listening: 1 Label: "Place around all graphics" Click: "Graphic.Neatline Option Update" ) (LButn.67 InternalName: "NLCancel" Label: "Cancel" Click: "Graphic.Neatline Close" ) (RButn.68 InternalName: "InsetFrom" Constraints: 0x55 Listening: 1 Label: "Inset from margins" Click: "Graphic.Neatline Option Update" ) (LButn.69 InternalName: "NLOK" Help: "Adds the neatline to your layout" Label: "OK" Click: "Graphic.Neatline" ) (AVCBox.70 InternalName: "GroupWith" Listening: 1 Label: "Group neatline with graphics" Constraints: 0x55 ) (RectD.71 Left: 9.00000000000000 Top: 266.00000000000000 Right: 293.00000000000000 Bottom: 108.00000000000000 ) (RectD.72 Left: 297.00000000000000 Top: 266.00000000000000 Right: 506.00000000000000 Bottom: 6.00000000000000 ) (RectD.73 Left: 13.00000000000000 Top: 32.00000000000000 Right: 253.00000000000000 Bottom: 10.00000000000000 ) (RectD.74 Left: 13.00000000000000 Top: 52.00000000000000 Right: 253.00000000000000 Bottom: 29.00000000000000 ) (RectD.75 Left: 333.00000000000000 Top: 297.00000000000000 Right: 415.00000000000000 Bottom: 272.00000000000000 ) (RectD.76 Left: 13.00000000000000 Top: 71.00000000000000 Right: 253.00000000000000 Bottom: 48.00000000000000 ) (RectD.77 Left: 424.00000000000000 Top: 297.00000000000000 Right: 505.00000000000000 Bottom: 272.00000000000000 ) (RectD.78 Left: 12.00000000000000 Top: 100.00000000000000 Right: 227.00000000000000 Bottom: 79.00000000000000 ) (Nil.79 ) (Script.80 Name: "Graphic.Neatline" SourceCode: "MTD = av.FindDialog(\"Neatline Settings\")\n\nSelGraphics = MTD.FindByName(\"SelGraphics\")\nAllGraphics = MTD.FindByName(\"AllGraphics\")\nInsetFrom = MTD.FindByName(\"InsetFrom\").IsSelected\nunitText = MTD.FindByName(\"unitText\")\nOffsetEqual = MTD.FindByName(\"OffsetEqual\").IsSelected\nEqualOffset = MTD.FindByName(\"EqualOffset\").GetText.AsNumber\nTopText = MTD.FindByName(\"TopText\")\nBottomText = MTD.FindByName(\"BottomText\")\nLeftText = MTD.FindByName(\"LeftText\")\nRightText = MTD.FindByName(\"RightText\")\nTopOffset = MTD.FindB yName(\"TopOffset\").GetText.AsNumber\nBottomOffset = MTD.FindByName(\"BottomOffset\").GetText.AsNumber\nLeftOffset = MTD.FindByName(\"LeftOffset\").GetText.AsNumber\nRightOffset = MTD.FindByName(\"RightOffset\").GetText.AsNumber\nRoundCorners = MTD.FindByName(\"RoundCorners\").IsSelected\nNeatStyle = MTD.FindByName(\"NeatStyle\").GetCurrentRow\nNeatWidth = MTD.FindByName(\"NeatWidth\").GetSelection.AsNumber\nBGColor = MTD.FindByName(\"BGColor\").GetSelection.GetColor\nDropShadow = MTD.FindByName(\"DropShadow\").IsSelected\nRoundCorn ers = MTD.FindByName(\"RoundCorners\").IsSelected\nCornerRadius = MTD.FindByName(\"CornerRadius\").GetSelection\nDSColor = MTD.FindByName(\"DSColor\").GetSelection\nGroupWith = MTD.FindByName(\"GroupWith\")\ntheLayout = av.GetActiveDoc\ntheGraphics = theLayout.GetGraphics\nOffset = true\n\n\nif (BGColor.IsTransparent.Not) then\n rf = RasterFill.Make\n rf.SetStyle(#RASTERFILL_STYLE_OPAQUESTIPPLE)\n rf.SetBGColor(BGColor)\nelse\n rf = RasterFill.Make\nend\n\nSelSet = nil\nif (theGraphics.Count > 0) then\n if (SelGraphics.IsSelecte d) then\n BaseRect = theGraphics.ReturnSelectedExtent\n SelSet = theGraphics.GetSelected\n else\n BaseRect = theGraphics.ReturnExtent\n end\nelse\n BaseRect = theLayout.Getdisplay.ReturnMarginExtent\n Offset = false\nend\n\nif (InsetFrom) then\n BaseRect = theLayout.Getdisplay.ReturnMarginExtent\n Offset = false\nend\n\nif ((Offset) and (OffsetEqual)) then\n NRect = BaseRect.ExpandBy((NeatWidth/72) + EqualOffset)\nelseif ((Offset) and (Not OffsetEqual)) then\n LLRect = BaseRect.Clone.ExpandBy(NeatWidth/72)\n URRect = BaseRect.Clone.ExpandBy(NeatWidth/72)\n LLRect.SetOrigin(LLRect.ReturnOrigin - (LeftOffset@BottomOffset))\n URRect.SetORigin(URRect.ReturnOrigin + (RightOffSet@TopOffset))\n NRect = LLRect.UnionWith(URRect)\nelseif ((Not Offset) and (OffsetEqual)) then\n NRect = BaseRect.InsetBy((NeatWidth/72) + EqualOffset)\nelseif ((Not Offset) and (Not OffsetEqual)) then\n LLRect = BaseRect.Clone.InsetBy(NeatWidth/72)\n URRect = BaseRect.Clone.InsetBy(NeatWidth/72)\n LLRect.SetOrigin(LLRect.ReturnOrigin + (LeftOff set@BottomOffset))\n URRect.SetORigin(URRect.ReturnOrigin - (RightOffSet@TopOffset))\n NRect = LLRect.UnionWith(URRect)\nend\nif (DropShadow) then\n dsf = RasterFill.Make\n dsf.SetStyle(#RASTERFILL_STYLE_SOLID)\n dsf.SetColor(DSColor.GetColor)\n dsf.SetOLWidth(0)\nend\n\ntheGraphics.UnSelectAll\nif (NeatStyle = 0) then\n if (RoundCorners) then\n RS = av.Run(\"Graphic.RoundRectCorners\",{NRect, CornerRadius})\n r = GraphicShape.Make(RS.AsPolyLine)\n else\n RS = NRect.AsPolygon\n NPL = RS.AsPolyline\n r = G raphicShape.Make(NPL)\n end\n r.GetSymbol.SetWidth(NeatWidth)\n r.GetSymbol.SetCapStyle(#BASICPEN_CAP_SQUARE)\n r.GetSymbol.SetJoinStyle(#BASICPEN_JOIN_MITER)\n theLayout.GetGraphics.AddBatch(r)\n r.setselected(true)\n if (DropShadow) then\n ds = GraphicShape.Make(RS.Clone)\n ds.Offset(0.25@(-0.25))\n ds.SetSymbol(dsf)\n theGraphics.AddBatch(ds)\n end\n if (BGColor.IsTransparent.Not) then\n rb = GraphicShape.Make(RS.Clone)\n rb.SetSymbol(rf)\n theGraphics.AddBatch(rb)\n theGraphics.MoveSelec tedToFront\n rb.SetSelected(true)\n end\nelseif (NeatStyle = 1) then\n if (RoundCorners) then\n RS1 = av.Run(\"Graphic.RoundRectCorners\",{NRect, CornerRadius})\n RS2 = av.Run(\"Graphic.RoundRectCorners\",{NRect, CornerRadius})\n r1 = GraphicShape.Make(RS1.AsPolyLine)\n r2 = GraphicShape.Make(RS2.AsPolyLine)\n RSB1 = NRect.Clone.InsetBy(NeatWidth/72)\n RSB2 = NRect.Clone.ExpandBy(NeatWidth/72)\n r1.SetBounds(RSB1.Clone)\n r2.SetBounds(RSB2.Clone)\n else\n RS1 = NRect.InsetBy(NeatWidth/72)\n NPL1 = RS1.AsPolygon.AsPolyline\n RS2 = NRect.ExpandBy(NeatWidth/72)\n NPL2 = RS2.AsPolygon.AsPolyline\n RSB2 = RS2.Clone\n r1 = GraphicShape.Make(NPL1)\n r2 = GraphicShape.Make(NPL2)\n end\n r2.GetSymbol.SetWidth(0.2)\n r1.GetSymbol.SetWidth(0.2)\n r1.GetSymbol.SetCapStyle(#BASICPEN_CAP_SQUARE)\n r1.GetSymbol.SetJoinStyle(#BASICPEN_JOIN_MITER)\n r2.GetSymbol.SetCapStyle(#BASICPEN_CAP_SQUARE)\n r2.GetSymbol.SetJoinStyle(#BASICPEN_JOIN_MITER)\n theLayout.GetGraphics.AddBatch(r1)\n theLayout.GetGra phics.AddBatch(r2)\n r1.setselected(true)\n r2.setselected(true)\n if (DropShadow) then\n ds = GraphicShape.Make(RS2.Clone)\n ds.Offset(0.25@(-0.25))\n ds.SetSymbol(dsf)\n theGraphics.AddBatch(ds)\n end\n if (BGColor.IsTransparent.Not) then\n rb = GraphicShape.Make(RS2.Clone)\n rb.SetSymbol(rf)\n rb.SetBounds(RSB2.Clone)\n theGraphics.Addbatch(rb)\n theGraphics.MoveSelectedToFront\n rb.SetSelected(true)\n end\nelseif (NeatStyle = 2) then\n if (RoundCorners) then\n RS1 = av.Run(\"Graphic. RoundRectCorners\",{NRect, CornerRadius})\n RS2 = av.Run(\"Graphic.RoundRectCorners\",{NRect, CornerRadius})\n r1 = GraphicShape.Make(RS1.AsPolyLine)\n r2 = GraphicShape.Make(RS2.AsPolyLine)\n RSB1 = NRect.Clone.InsetBy(NeatWidth/72)\n RSB2 = NRect.Clone.ExpandBy(NeatWidth/72)\n r1.SetBounds(RSB1.Clone)\n r2.SetBounds(RSB2.Clone)\n else\n RS1 = NRect.InsetBy(NeatWidth/72)\n NPL1 = RS1.AsPolygon.AsPolyline\n RS2 = NRect.ExpandBy(NeatWidth/72)\n NPL2 = RS2.AsPolygon.AsPolyline\n RSB2 = RS 2.Clone\n r1 = GraphicShape.Make(NPL1)\n r2 = GraphicShape.Make(NPL2)\n end\n r2.GetSymbol.SetWidth(0.2)\n r1.GetSymbol.SetWidth(NeatWidth * 0.62)\n r1.GetSymbol.SetCapStyle(#BASICPEN_CAP_SQUARE)\n r1.GetSymbol.SetJoinStyle(#BASICPEN_JOIN_MITER)\n r2.GetSymbol.SetCapStyle(#BASICPEN_CAP_SQUARE)\n r2.GetSymbol.SetJoinStyle(#BASICPEN_JOIN_MITER)\n theLayout.GetGraphics.AddBatch(r1)\n theLayout.GetGraphics.AddBatch(r2)\n r1.setselected(true)\n r2.setselected(true)\n if (DropShadow) then\n ds = GraphicShap e.Make(RS2.Clone)\n ds.Offset(0.25@(-0.25))\n ds.SetSymbol(dsf)\n theGraphics.AddBatch(ds)\n end\n if (BGColor.IsTransparent.Not) then\n rb = GraphicShape.Make(RS2.Clone)\n rb.SetSymbol(rf)\n rb.SetBounds(RSB2.Clone)\n theGraphics.Addbatch(rb)\n theGraphics.MoveSelectedToFront\n rb.SetSelected(true)\n end\nelseif (NeatStyle = 3) then\n if (RoundCorners) then\n RS1 = av.Run(\"Graphic.RoundRectCorners\",{NRect, CornerRadius})\n RS2 = av.Run(\"Graphic.RoundRectCorners\",{NRect, CornerRadius})\n RS3 = av.Run(\"Graphic.RoundRectCorners\",{NRect, CornerRadius})\n r1 = GraphicShape.Make(RS1.AsPolyLine)\n r2 = GraphicShape.Make(RS2.AsPolyLine)\n r3 = GraphicShape.Make(RS2.AsPolyLine)\n RSB1 = NRect.Clone.InsetBy(NeatWidth/72)\n RSB2 = NRect.Clone\n RSB3 = NRect.Clone.ExpandBy(NeatWidth/72)\n r1.SetBounds(RSB2.Clone)\n r2.SetBounds(RSB1.Clone)\n r3.SetBounds(RSB3.Clone)\n else\n RS1 = NRect.Clone.InsetBy(NeatWidth/72)\n NPL1 = RS1.AsPolygon.AsPolyline\n RS2 = NRect.Clone\n NP L2 = RS2.AsPolygon.AsPolyline\n RS3 = NRect.Clone.ExpandBy(NeatWidth/72)\n NPL3 = RS3.AsPolygon.AsPolyline\n RSB3 = RS3.Clone\n r1 = GraphicShape.Make(NPL1)\n r2 = GraphicShape.Make(NPL2)\n r3 = GraphicShape.Make(NPL3)\n end \n r1.GetSymbol.SetWidth(0.2)\n r2.GetSymbol.SetWidth(0.2)\n r3.GetSymbol.SetWidth(0.2)\n r1.GetSymbol.SetCapStyle(#BASICPEN_CAP_SQUARE)\n r1.GetSymbol.SetJoinStyle(#BASICPEN_JOIN_MITER)\n r2.GetSymbol.SetCapStyle(#BASICPEN_CAP_SQUARE)\n r2.GetSymbol.SetJoinStyle(#BASICPEN_ JOIN_MITER)\n r3.GetSymbol.SetCapStyle(#BASICPEN_CAP_SQUARE)\n r3.GetSymbol.SetJoinStyle(#BASICPEN_JOIN_MITER)\n theLayout.GetGraphics.AddBatch(r1)\n theLayout.GetGraphics.AddBatch(r2)\n theLayout.GetGraphics.AddBatch(r3)\n r1.setselected(true)\n r2.setselected(true)\n r3.setselected(true)\n if (DropShadow) then\n ds = GraphicShape.Make(RS3.Clone)\n ds.SetBounds(RSB3.Clone)\n ds.Offset(0.25@(-0.25))\n ds.SetSymbol(dsf)\n theGraphics.AddBatch(ds)\n end\n if (BGColor.IsTransparent.Not) then\n rb = GraphicShape.Make(RS3.Clone)\n rb.SetBounds(RSB3.Clone)\n rb.SetSymbol(rf)\n theGraphics.AddBatch(rb)\n theGraphics.MoveSelectedToFront\n rb.SetSelected(true)\n end\nelseif (NeatStyle = 4) then\n if (RoundCorners) then\n RS1 = av.Run(\"Graphic.RoundRectCorners\",{NRect, CornerRadius})\n RS2 = av.Run(\"Graphic.RoundRectCorners\",{NRect, CornerRadius})\n RS3 = av.Run(\"Graphic.RoundRectCorners\",{NRect, CornerRadius})\n r1 = GraphicShape.Make(RS1.AsPolyLine)\n r2 = GraphicShape.Make(RS2.AsPolyLi ne)\n r3 = GraphicShape.Make(RS2.AsPolyLine)\n RSB1 = NRect.Clone.InsetBy(NeatWidth/72)\n RSB2 = NRect.Clone\n RSB3 = NRect.Clone.ExpandBy(NeatWidth/72)\n r1.SetBounds(RSB1.Clone)\n r2.SetBounds(RSB2.Clone)\n r3.SetBounds(RSB3.Clone)\n else\n RS1 = NRect.Clone.InsetBy(NeatWidth/72)\n NPL1 = RS1.AsPolygon.AsPolyline\n RS2 = NRect.Clone\n NPL2 = RS2.AsPolygon.AsPolyline\n RS3 = NRect.Clone.ExpandBy(NeatWidth/72)\n NPL3 = RS3.AsPolygon.AsPolyline\n RSB3 = RS3.Clone\n r1 = GraphicS hape.Make(NPL1)\n r2 = GraphicShape.Make(NPL2)\n r3 = GraphicShape.Make(NPL3)\n end \n r1.GetSymbol.SetWidth(0.2)\n r2.GetSymbol.SetWidth(NeatWidth * 0.62)\n r3.GetSymbol.SetWidth(0.2)\n r1.GetSymbol.SetCapStyle(#BASICPEN_CAP_SQUARE)\n r1.GetSymbol.SetJoinStyle(#BASICPEN_JOIN_MITER)\n r2.GetSymbol.SetCapStyle(#BASICPEN_CAP_SQUARE)\n r2.GetSymbol.SetJoinStyle(#BASICPEN_JOIN_MITER)\n r3.GetSymbol.SetCapStyle(#BASICPEN_CAP_SQUARE)\n r3.GetSymbol.SetJoinStyle(#BASICPEN_JOIN_MITER)\n theLayout.GetGraphics.A ddBatch(r1)\n theLayout.GetGraphics.AddBatch(r2)\n theLayout.GetGraphics.AddBatch(r3)\n r1.setselected(true)\n r2.setselected(true)\n r3.setselected(true)\n if (DropShadow) then\n ds = GraphicShape.Make(RS3.Clone)\n ds.Offset(0.25@(-0.25))\n ds.SetSymbol(dsf)\n theGraphics.AddBatch(ds)\n end\n if (BGColor.IsTransparent.Not) then\n rb = GraphicShape.Make(RS3.Clone)\n rb.SetBounds(RSB3.Clone)\n rb.SetSymbol(rf)\n theGraphics.Addbatch(rb)\n theGraphics.MoveSelectedToFront\n rb.SetSelected(t rue)\n end\nend\nif (DropShadow) then\n ds.SetSelected(true)\nend\ntheGraphics.GroupSelected \ntheNL = theGraphics.GetSelected.Get(0)\n\nif (SelSet = nil) then\n theGraphics.MoveSelectedToBack\n if (GroupWith.IsSelected) then\n theGraphics.SelectAll\n theGraphics.GroupSelected\n end\nelse\n theGraphics.UnSelectAll\n theGraphics.MoveSelectedToFront ' Moves the neat line to front\n for each g in SelSet\n g.SetSelected(True)\n end\n theGraphics.MoveSelectedToFront ' Moves the surrounded graphics to the front, a top the neatline\n if (GroupWith.IsSelected) then\n theNL.SetSelected(true)\n theGraphics.GroupSelected\n end\nend\ntheGraphics.EndBatch\ntheGraphics.GetSelected.Get(0).Invalidate\n\nMTD.CLose\n" ) (Script.81 Name: "Graphic.Neatline Can Drop Shadow" SourceCode: "MTD = av.FindDialog(\"Neatline Settings\")\n\nBGColor = MTD.FindByName(\"BGColor\").GetSelection\nDropShadow = MTD.FindByName(\"DropShadow\")\nDSColor = MTD.FindByName(\"DSColor\")\nDSLabel = MTD.FindByName(\"DSLabel\")\n\ne = false\nif (BGColor.GetColor.IsTransparent.Not) then\n e = true\nelse \n DSColor.SetEnabled(e)\n DSLabel.SetEnabled(e)\nend\n\nDropShadow.SetEnabled(e)\n\nif (not e) then\n DropShadow.SetSelected(false)\nend\n" ) (Script.82 Name: "Graphic.Neatline Close" SourceCode: "MTD = av.FindDialog(\"Neatline Settings\")\nMTD.Close" ) (Script.83 Name: "Graphic.Neatline DropShadow Update" SourceCode: "MTD = av.FindDialog(\"Neatline Settings\")\n\nDSColor = MTD.FindByName(\"DSColor\")\nDSLabel = MTD.FindByName(\"DSLabel\")\n\ne = false\nif (Self.IsSelected) then\n e = true\nend\n\nDSColor.SetEnabled(e)\nDSLabel.SetEnabled(e)" ) (Script.84 Name: "Graphic.Neatline Nice Size" SourceCode: "MTD = av.FindDialog(\"Neatline Settings\")\nSelGraphics = MTD.FindByName(\"SelGraphics\")\nAllGraphics = MTD.FindByName(\"AllGraphics\")\nInsetFrom = MTD.FindByName(\"InsetFrom\")\nNeatStyle = MTD.FindByName(\"NeatStyle\").GetCurrentRow\nNeatWidth = MTD.FindByName(\"NeatWidth\")\nCurrWidth = NeatWidth.GetSelection.AsNumber\n\nLineWeights1 = {\"0.1\",\"0.2\",\"0.25\",\"0.5\",\"0.75\",\"1.0\",\"1.25\",\"1.5\",\"2.0\",\"2.5\",\"3.0\",\"4.0\",\"5.0\",\"6.0\",\"7.0\",\"8.0\"}\nLineWeights2 = {\"2.0\",\"2.5\",\"3.0\",\"4.0\",\"5.0\",\"6.0\",\"7.0\",\"8.0\",\"1.5\",\"1.25\",\"1.0\",\"0.75 \",\"0.5\"}\nLineWeights3 = {\"3.0\",\"4.0\",\"5.0\",\"6.0\",\"7.0\",\"8.0\",\"2.0\",\"2.5\",\"1.5\",\"1.25\",\"1.0\"}\n\nif (NeatStyle = 0) then\n NeatWidth.DefineFromList(LineWeights1)\nelseif ((NeatStyle = 1) or (NeatStyle = 2)) then\n NeatWidth.DefineFromList(LineWeights2)\nelse\n NeatWidth.DefineFromList(LineWeights3)\nend" ) (Script.85 Name: "Graphic.Neatline Offset Option" SourceCode: "MTD = av.FindDialog(\"Neatline Settings\")\nOffsetEqual = MTD.FindByName(\"OffsetEqual\")\nEqualOffset = MTD.FindByName(\"EqualOffset\")\nTopText = MTD.FindByName(\"TopText\")\nBottomText = MTD.FindByName(\"BottomText\")\nLeftText = MTD.FindByName(\"LeftText\")\nRightText = MTD.FindByName(\"RightText\")\nTopOffset = MTD.FindByName(\"TopOffset\")\nBottomOffset = MTD.FindByName(\"BottomOffset\")\nLeftOffset = MTD.FindByName(\"LeftOffset\")\nRightOffset = MTD.FindByName(\"RightOffset\")\n\nif (OffsetEqual.IsSelected) then\n EqualOffset.SetEnab led(true)\n TopText.SetEnabled(false)\n TopOffset.SetEnabled(false)\n BottomText.SetEnabled(false)\n BottomOffset.SetEnabled(false)\n LeftText.SetEnabled(false)\n LeftOffset.SetEnabled(false)\n RightText.SetEnabled(false)\n RightOffset.SetEnabled(false)\nelse\n EqualOffset.SetEnabled(false)\n TopText.SetEnabled(true)\n TopOffset.SetEnabled(true)\n BottomText.SetEnabled(true)\n BottomOffset.SetEnabled(true)\n LeftText.SetEnabled(true)\n LeftOffset.SetEnabled(true)\n RightText.SetEnabled(true)\n RightOffset.Se tEnabled(true)\nend\n\n\n" ) (Script.86 Name: "Graphic.Neatline Open" SourceCode: "MTD = av.FindDialog(\"Neatline Settings\")\n\nSelGraphics = MTD.FindByName(\"SelGraphics\")\nAllGraphics = MTD.FindByName(\"AllGraphics\")\nunitText = MTD.FindByName(\"unitText\")\nOffsetEqual = MTD.FindByName(\"OffsetEqual\")\nEqualOffset = MTD.FindByName(\"EqualOffset\")\nTopText = MTD.FindByName(\"TopText\")\nBottomText = MTD.FindByName(\"BottomText\")\nLeftText = MTD.FindByName(\"LeftText\")\nRightText = MTD.FindByName(\"RightText\")\nTopOffset = MTD.FindByName(\"TopOffset\")\nBottomOffset = MTD.FindByName(\"BottomOffset\")\nLeftOffset = M TD.FindByName(\"LeftOffset\")\nRightOffset = MTD.FindByName(\"RightOffset\")\nNeatStyle = MTD.FindByName(\"NeatStyle\")\nNeatWidth = MTD.FindByName(\"NeatWidth\")\nInsetFrom = MTD.FindByName(\"InsetFrom\")\nCornerRadius = MTD.FindByName(\"CornerRadius\")\nBGColor = MTD.FindByName(\"BGColor\")\nDropShadow = MTD.FindByName(\"DropShadow\")\nRoundCorners = MTD.FindByName(\"RoundCorners\")\nGroupWith = MTD.FindByName(\"GroupWith\")\nDSColor = MTD.FindByName(\"DSColor\")\nDSLabel = MTD.FindByName(\"DSLabel\")\nRadLab = MTD.FindByName(\"RadLab\")\n\nOff setEqual.SetSelected(true)\nOffsetEqual.Click\nRoundCorners.SetSelected(false)\nRoundCorners.Click\nDropShadow.SetEnabled(false) \nDropShadow.SetSelected(false) \n\nif ((SelGraphics.IsEnabled.Not) and (AllGraphics.IsEnabled.Not)) then\n InsetFrom.Select\n InsetFrom.Click\nend \n \nifn1 = \"$AVHOME/tools/bitmaps/solid.bmp\".AsFileName\nifn2 = \"$AVHOME/tools/bitmaps/double.bmp\".AsFileName\nifn3 = \"$AVHOME/tools/bitmaps/dtt.bmp\".AsFileName\nifn4 = \"$AVHOME/tools/bitmaps/triple.bmp\".AsFileName\nifn5 = \"$AVHOME/ tools/bitmaps/ttt.bmp\".AsFileName\n\nif (File.Exists(ifn1)) then\n Icon1 = Icon.Make(ifn1)\n Icon2 = Icon.Make(ifn2)\n Icon3 = Icon.Make(ifn3)\n Icon4 = Icon.Make(ifn4)\n Icon5 = Icon.Make(ifn5)\n Icon1.SetName(\"Single line\")\n Icon2.SetName(\"Double line\")\n Icon3.SetName(\"Double thick|thin\")\n Icon4.SetName(\"Triple line\")\n Icon5.SetName(\"Triple thin|thick|thin\")\n lineStyles = {Icon1,Icon2,Icon3,Icon4,Icon5}\nend\n\n\nRadii = {0.125,0.1875, 0.25,0.3125, 0.375, 0.5, 0.625, 0.75} \nfor each nx in Radii\n nx.S etFormat(\"d.dddd\")\nend\nCornerRadius.DefineFromList(Radii) \n \nNeatStyle.DefineFromList(lineStyles) \nNeatStyle.FitRows((0..4),false)\n \nLineWeights1 = {\"0.1\",\"0.2\",\"0.25\",\"0.5\",\"0.75\",\"1.0\",\"1.25\",\"1.5\",\"2.0\",\"2.5\",\"3.0\",\"4.0\",\"5.0\",\"6.0\",\"7.0\",\"8.0\"}\nNeatWidth.DefineFromList(LineWeights1)\n\nblack = Color.GetBlack\ndGrey = Color.Make\ndGrey.SetRGBList({100,100,100})\nGrey = Color.Make\nGrey.SetRGBList({165,165,165})\nlGrey = Color.Make\nlGrey.SetRGBList({210,210,210})\nwhite = Color.GetWhite\nd Red = Color.Make\ndRed.SetRGBList({130,0,0})\nRed = Color.GetRed\nlRed = Color.Make\nlRed.SetRGBList({255,180,180})\ndOrange = Color.Make\ndOrange.SetRGBList({140,100,0})\nOrange = Color.Make\nOrange.SetRGBList({255,180,0})\nlOrange = Color.Make\nlOrange.SetRGBList({255,200,135})\ndYellow = Color.Make\ndYellow.SetRGBList({200,200,110})\nYellow = Color.GetYellow\nlYellow = Color.Make\nlYellow.SetRGBList({255,255,200})\ndGreen = Color.Make\ndGreen.SetRGBList({0,110,0})\nGreen = Color.GetGreen\nlGreen = Color.Make\nlGreen.SetRGBL ist({180,255,180})\ndCyan = Color.Make\ndCyan.SetRGBList({0,130,130})\nCyan = Color.GetCyan\nlCyan = Color.Make\nlCyan.SetRGBList({150,255,255})\ndBlue = Color.Make\ndBlue.SetRGBList({0,0,130})\nBlue = Color.GetBlue\nlBlue = Color.Make\nlBlue.SetRGBList({180,180,255})\ndPurple = Color.Make\ndPurple.SetRGBList({130,0,130})\nPurple = Color.Make\nPurple.SetRGBList({255,0,255})\nlPurple = Color.Make\nlPurple.SetRGBList({255,180,255})\nTransP = color.Make\nTransP.SetTransparent(true)\n\n\n\ntheFGColors = {TransP,Black,White,dGrey,Gre y,lGrey,dRed,Red,lRed,dOrange,Orange,lOrange,dYellow,Yellow,\n lYellow,dGreen,Green,lGreen,dCyan,Cyan,lCyan,dBlue,Blue,lBlue,dPurple,Purple,lPurple}\ntheDSColors = {dGrey,Grey,dRed,dOrange,dGreen,DCyan,dBlue,dPurple}\n\ntheFGSyms = {}\nfor each c in theFGColors\n rx = RasterFill.Make\n rx.SetStyle(#RASTERFILL_STYLE_SOLID)\n rx.SetColor(c)\n theFGSyms.Add(rx.Clone)\nend\ntheDSSyms = {}\nfor each c in theDSColors\n rx = RasterFill.Make\n rx.SetStyle(#RASTERFILL_STYLE_SOLID)\n rx.SetColor(c)\n theDSSyms. Add(rx.Clone)\nend\n\nBGColor.DefineFromList(theFGSyms)\nDSColor.DefineFromList(theDSSyms)\nDSColor.SetEnabled(false)\nDSLabel.SetEnabled(false)\nif (av.GetActiveDoc.GetClass.GetClassName = \"Layout\") then\n if (av.GetActiveDoc.GetGraphics.Count = 0) then\n GroupWith.SetSelected(false)\n GroupWith.SetEnabled(false)\n else\n GroupWith.SetEnabled(true)\n end\nend" ) (Script.87 Name: "Graphic.Neatline Option Update" SourceCode: "MTD = av.FindDialog(\"Neatline Settings\")\nInsetFrom = MTD.FindByName(\"InsetFrom\")\nOffsetEqual = MTD.FindByName(\"OffsetEqual\")\n\nif (InsetFrom.IsSelected) then\n OffSetEqual.SetLabel(\"Inset equally:\")\nelse\n OffSetEqual.SetLabel(\"Offset equally:\")\nend" ) (Script.88 Name: "Graphic.Neatline Round" SourceCode: "MTD = av.FindDialog(\"Neatline Settings\")\nCornerRadius = MTD.FindByName(\"CornerRadius\")\nRadLab = MTD.FindByName(\"RadLab\")\n\ne = false\nif (Self.IsSelected) then\n e = true\nend\n \nCornerRadius.SetEnabled(e)\nRadLab.SetEnabled(e)\n \n " ) (Script.89 Name: "Graphic.Neatline Show" SourceCode: "MTD = av.FindDialog(\"Neatline Settings\")\nSelGraphics = MTD.FindByName(\"SelGraphics\")\nAllGraphics = MTD.FindByName(\"AllGraphics\")\nunitText = MTD.FindByName(\"unitText\")\nOffsetEqual = MTD.FindByName(\"OffsetEqual\")\nEqualOffset = MTD.FindByName(\"EqualOffset\")\nTopText = MTD.FindByName(\"TopText\")\nBottomText = MTD.FindByName(\"BottomText\")\nLeftText = MTD.FindByName(\"LeftText\")\nRightText = MTD.FindByName(\"RightText\")\nTopOffset = MTD.FindByName(\"TopOffset\")\nBottomOffset = MTD.FindByName(\"BottomOffset\")\nLeftOffset = MT D.FindByName(\"LeftOffset\")\nRightOffset = MTD.FindByName(\"RightOffset\")\nNeatStyle = MTD.FindByName(\"NeatStyle\")\nNeatWidth = MTD.FindByName(\"NeatWidth\")\nInsetFrom = MTD.FindByName(\"InsetFrom\")\n\ntheLayout = av.GetActiveDoc\ntheGraphics = theLayout.GetGraphics\nif (theGraphics.GetSelected.Count > 0) then\n SelGraphics.SetEnabled(true)\n AllGraphics.SetEnabled(true)\n SelGraphics.Select\n OffSetEqual.SetLabel(\"Offset equally from all sides:\")\nelseif (theGraphics.Count > 0) then\n SelGraphics.SetEnabled(false)\n Al lGraphics.SetEnabled(true)\n AllGraphics.Select\n OffSetEqual.SetLabel(\"Offset equally from all sides:\")\nelse\n OffSetEqual.SetLabel(\"Inset equally from margins:\")\n SelGraphics.SetEnabled(false)\n AllGraphics.SetEnabled(false)\nend\nTopText.SetEnabled(false)\nTopOffset.SetEnabled(false)\nBottomText.SetEnabled(false)\nBottomOffset.SetEnabled(false)\nLeftText.SetEnabled(false)\nLeftOffset.SetEnabled(false)\nRightText.SetEnabled(false)\nRightOffset.SetEnabled(false)\n\nUnitStr = theLayout.GetDisplay.GetDistanceUnits.AsS tring.AsTokens(\"_\").Get(2).LCase\nunitText.SetLabel(\"(\"+UnitStr+\"):\")\n\n\nMTD.Open" ) (Script.90 Name: "Graphic.RoundRectCorners" SourceCode: "br = Self.Get(0)\nr = Self.Get(1)\nHStrat = br.GetWidth - (2 * r)\nVStrat = br.GetHeight - (2 * r)\nrStart = HStrat + r\ntStart = r + VStrat\nsp1 = br.ReturnOrigin + (rStart@tStart)\nsp2 = br.ReturnOrigin + (r@tStart)\nsp3 = br.ReturnOrigin + (r@r)\nsp4 = br.ReturnOrigin + (rStart@r)\npList = {}\nfor each u in 0..90 \n y = u.AsRadians.Sin * r\n x = u.AsRadians.Cos * r\n pList.Add((sp1 + (x@y)))\nend\nfor each u in 90..180 \n y = u.AsRadians.Sin * r\n x = u.AsRadians.Cos * r\n pList.Add((sp2 + (x@y)))\nend\nfor each u in 1 80..270 \n y = u.AsRadians.Sin * r\n x = u.AsRadians.Cos * r\n pList.Add((sp3 + (x@y)))\nend\nfor each u in 270..360 \n y = u.AsRadians.Sin * r\n x = u.AsRadians.Cos * r\n pList.Add((sp4 + (x@y)))\nend\nRCShape = Polygon.Make({pList})\nreturn RCShape" ) (Script.91 Name: "Neatline.CanUnload" SourceCode: "return (System.CanUnloadLibrary(self.GetDependencies.Get(0)))" ) (Script.92 Name: "Neatline.Unload" SourceCode: "Dialog.DetachFromExtension(self)" )